home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 62
/
Volume 62 - JOGO DISK .iso
/
Games
/
my-shop-dress-up.swf
/
scripts
/
frame_3
/
DoAction.as
Wrap
Text File
|
2008-03-17
|
1KB
|
45 lines
function selectCharacter(id)
{
if(selectedChar1 == undefined)
{
selectedChar1 = id;
attachMovie("photo" + id,"char" + id,1);
this["char" + id]._x = photo1._x;
this["char" + id]._y = photo1._y;
}
else if(selectedChar2 == undefined)
{
selectedChar2 = id;
attachMovie("photo" + id,"char" + id,2);
this["char" + id]._x = photo2._x;
this["char" + id]._y = photo2._y;
var i = 1;
while(i <= 4)
{
this["select" + i].enabled = 0;
i++;
}
nextButton._visible = 1;
}
}
stop();
nextButton._visible = 0;
nextButton.onPress = function()
{
_root["char" + selectedChar1].removeMovieClip();
_root["char" + selectedChar2].removeMovieClip();
nextFrame();
};
selectedChar1 = undefined;
selectedChar2 = undefined;
var i = 1;
while(i <= 4)
{
this["select" + i].index = i;
this["select" + i].onRelease = function()
{
_root.selectCharacter(this.index);
};
i++;
}